package com.myrslok.set;

import com.myrslok.util.ZipUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.io.File;

public class ZArchive extends BasicArchive {

    public ZArchive(@NotNull final String zipFile, @Nullable final String baseDir) {
        super(new File(zipFile), new File(baseDir));
    }

    public ZArchive(@NotNull final String zip) {
        super(new File(zip), null);
    }

    @Override
    public void archive() {
        ZipUtil.zip(target, getResources());
    }

    @Override
    public void extractTo(@NotNull final File dest) {
        ZipUtil.unzip(target, dest);
    }

}
